package org.btik.lightweb.conf;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

/**
 * @author lustre
 * @since 2023/6/29 19:09
 */
@Configuration
public class SystemSettingsConf {

    @Configuration
    @ConfigurationProperties(prefix = "system-settings")
    public static class SystemSettings {
        private Map<String, String> defaultSettings;

        public void setDefaultSettings(Map<String, String> defaultSettings) {
            this.defaultSettings = defaultSettings;
        }
    }

    @Bean("defaultSettings")
    public Map<String, String> defaultSettings(SystemSettings systemSettings) {
        return systemSettings.defaultSettings;
    }


}
